Optimal. Leaf size=120 \[ -\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{h (g+h x)}+\frac {B n (b c-a d) \log (g+h x)}{(b g-a h) (d g-c h)}+\frac {b B n \log (a+b x)}{h (b g-a h)}-\frac {B d n \log (c+d x)}{h (d g-c h)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 132, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {6742, 2490, 36, 31} \[ \frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x) (b g-a h)}-\frac {B n (b c-a d) \log (c+d x)}{(b g-a h) (d g-c h)}+\frac {B n (b c-a d) \log (g+h x)}{(b g-a h) (d g-c h)}-\frac {A}{h (g+h x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 2490
Rule 6742
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx &=\int \left (\frac {A}{(g+h x)^2}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2}\right ) \, dx\\ &=-\frac {A}{h (g+h x)}+B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx\\ &=-\frac {A}{h (g+h x)}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b g-a h) (g+h x)}-\frac {(B (b c-a d) n) \int \frac {1}{(c+d x) (g+h x)} \, dx}{b g-a h}\\ &=-\frac {A}{h (g+h x)}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b g-a h) (g+h x)}-\frac {(B d (b c-a d) n) \int \frac {1}{c+d x} \, dx}{(b g-a h) (d g-c h)}+\frac {(B (b c-a d) h n) \int \frac {1}{g+h x} \, dx}{(b g-a h) (d g-c h)}\\ &=-\frac {A}{h (g+h x)}-\frac {B (b c-a d) n \log (c+d x)}{(b g-a h) (d g-c h)}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(b g-a h) (g+h x)}+\frac {B (b c-a d) n \log (g+h x)}{(b g-a h) (d g-c h)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 117, normalized size = 0.98 \[ \frac {-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x}+\frac {B n (b \log (a+b x) (d g-c h)+\log (c+d x) (a d h-b d g)+h (b c-a d) \log (g+h x))}{(b g-a h) (d g-c h)}-\frac {A}{g+h x}}{h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 11.67, size = 250, normalized size = 2.08 \[ -\frac {A b d g^{2} + A a c h^{2} - {\left (A b c + A a d\right )} g h - {\left ({\left (B b d g h - B b c h^{2}\right )} n x + {\left (B a d g h - B a c h^{2}\right )} n\right )} \log \left (b x + a\right ) + {\left ({\left (B b d g h - B a d h^{2}\right )} n x + {\left (B b c g h - B a c h^{2}\right )} n\right )} \log \left (d x + c\right ) - {\left ({\left (B b c - B a d\right )} h^{2} n x + {\left (B b c - B a d\right )} g h n\right )} \log \left (h x + g\right ) + {\left (B b d g^{2} + B a c h^{2} - {\left (B b c + B a d\right )} g h\right )} \log \relax (e)}{b d g^{3} h + a c g h^{3} - {\left (b c + a d\right )} g^{2} h^{2} + {\left (b d g^{2} h^{2} + a c h^{4} - {\left (b c + a d\right )} g h^{3}\right )} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 166, normalized size = 1.38 \[ \frac {B b^{2} n \log \left ({\left | -b x - a \right |}\right )}{b^{2} g h - a b h^{2}} - \frac {B d^{2} n \log \left ({\left | d x + c \right |}\right )}{d^{2} g h - c d h^{2}} - \frac {B n \log \left (b x + a\right )}{h^{2} x + g h} + \frac {B n \log \left (d x + c\right )}{h^{2} x + g h} + \frac {{\left (B b c n - B a d n\right )} \log \left (h x + g\right )}{b d g^{2} - b c g h - a d g h + a c h^{2}} - \frac {A + B}{h^{2} x + g h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.53, size = 1796, normalized size = 14.97 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.76, size = 151, normalized size = 1.26 \[ \frac {{\left (\frac {b e n \log \left (b x + a\right )}{b g h - a h^{2}} - \frac {d e n \log \left (d x + c\right )}{d g h - c h^{2}} - \frac {{\left (b c e n - a d e n\right )} \log \left (h x + g\right )}{{\left (d g h - c h^{2}\right )} a - {\left (d g^{2} - c g h\right )} b}\right )} B}{e} - \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{h^{2} x + g h} - \frac {A}{h^{2} x + g h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.72, size = 141, normalized size = 1.18 \[ \frac {B\,d\,n\,\ln \left (c+d\,x\right )}{c\,h^2-d\,g\,h}-\frac {\ln \left (g+h\,x\right )\,\left (B\,a\,d\,n-B\,b\,c\,n\right )}{a\,c\,h^2+b\,d\,g^2-a\,d\,g\,h-b\,c\,g\,h}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{h\,\left (g+h\,x\right )}-\frac {B\,b\,n\,\ln \left (a+b\,x\right )}{a\,h^2-b\,g\,h}-\frac {A}{x\,h^2+g\,h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________